package org.elkastud.model;

/**
 * Result of DNASequence matching (3 sequences)
 * Result contains 3 sequences with gap representation (char code '-')
 * Corresponding nucleobases (or gaps) in each DNASequence represents a match
 * Additionally, result holds score.
 *
 * @author Jakub Skierbiszewski
 */
public class MatchResult3
{
	/** Result sequences m!, mB and mC */
	private DNASequence mA, mB, mC;

	/** Match score */
	private int score;

	/**
	 * Constructs result from 3 DNASequences
	 *
	 * @param a first sequence
	 * @param b second sequence
	 * @param c third sequence
	 * @param score match score
	 *
	 * @see NeeldemanWunchMatch3
	 * @see DNASequence
	 */
	public MatchResult3(DNASequence a, DNASequence b, DNASequence c, int score)
	{
		mA = a;
		mB = b;
		mC = c;
		this.score = score;
	}

	/**
	 * Constructs result from 3 Strings.
	 * Each string converted to DNASequence iside, which
	 * validates each string
	 * 
	 * @param a first sequence (String)
	 * @param b second sequence (String)
	 * @param c third sequence (String)
	 * @param score match score
	 */
	public MatchResult3(String a, String b, String c, int score)
	{
		mA = new DNASequence(a);
		mB = new DNASequence(b);
		mC = new DNASequence(c);
		this.score = score;
	}

	/**
	 * Return first from 3 match sequences
	 * @return DNASequence
	 */
	public DNASequence getSequenceA() { return mA; }

	/**
	 * Return second from 3 match sequences
	 * @return DNASequence
	 */
	public DNASequence getSequenceB() { return mB; }

	/**
	 * Return third from 3 match sequences
	 * @return DNASequence
	 */
	public DNASequence getSequenceC() { return mC; }

	/**
	 * Returns score for match
	 * @return DNASequence
	 */
	public int getScore() { return score; }
}
